// TODO: 数组
// DATE: 2022/3/18
// AUTHOR: Cheng Ze WUST
fun main(args: Array<String>){
    val intArray= intArrayOf(2,3,6,5)
    println(intArray[0])
    intArray.forEach {
        println(it)
    }
    println(intArray.elementAtOrElse(5) {-1})
    println(intArray.elementAtOrNull(6))

    //list转array
    val list= listOf("asd","vcx","ok")
    val list2array = list.toTypedArray()
    println(list2array[0])
}